<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Ocr\V20181119\Models;
use TencentCloud\Common\AbstractModel;

/**
 * ExtractDocMulti response structure.
 *
 * @method float getAngle() Obtain Image rotation angle (angle system). the text's horizontal direction is 0. clockwise is positive; counterclockwise is negative.
 * @method void setAngle(float $Angle) Set Image rotation angle (angle system). the text's horizontal direction is 0. clockwise is positive; counterclockwise is negative.
 * @method array getStructuralList() Obtain Configures the structured text info.
 * @method void setStructuralList(array $StructuralList) Set Configures the structured text info.
 * @method array getWordList() Obtain Restore text information.
 * @method void setWordList(array $WordList) Set Restore text information.
 * @method integer getTokenNum() Obtain Number of sample identification fields.
 * @method void setTokenNum(integer $TokenNum) Set Number of sample identification fields.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class ExtractDocMultiResponse extends AbstractModel
{
    /**
     * @var float Image rotation angle (angle system). the text's horizontal direction is 0. clockwise is positive; counterclockwise is negative.
     */
    public $Angle;

    /**
     * @var array Configures the structured text info.
     */
    public $StructuralList;

    /**
     * @var array Restore text information.
     */
    public $WordList;

    /**
     * @var integer Number of sample identification fields.
     */
    public $TokenNum;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param float $Angle Image rotation angle (angle system). the text's horizontal direction is 0. clockwise is positive; counterclockwise is negative.
     * @param array $StructuralList Configures the structured text info.
     * @param array $WordList Restore text information.
     * @param integer $TokenNum Number of sample identification fields.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Angle",$param) and $param["Angle"] !== null) {
            $this->Angle = $param["Angle"];
        }

        if (array_key_exists("StructuralList",$param) and $param["StructuralList"] !== null) {
            $this->StructuralList = [];
            foreach ($param["StructuralList"] as $key => $value){
                $obj = new GroupInfo();
                $obj->deserialize($value);
                array_push($this->StructuralList, $obj);
            }
        }

        if (array_key_exists("WordList",$param) and $param["WordList"] !== null) {
            $this->WordList = [];
            foreach ($param["WordList"] as $key => $value){
                $obj = new WordItem();
                $obj->deserialize($value);
                array_push($this->WordList, $obj);
            }
        }

        if (array_key_exists("TokenNum",$param) and $param["TokenNum"] !== null) {
            $this->TokenNum = $param["TokenNum"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
